package com.zxz.jvm;

import java.util.ArrayList;
import java.util.List;

/**
 * VM Args:-XX:MaxMetaspaceSize=
 */
public class RuntimeConstantPoolOOM {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>(100);
        int i = 0;
        while (true){
            list.add(("wrtytuihhgfgdvbghfgfdsdsdfdfg"+(i++)).intern());
        }
    }

    public void test(){
        synchronized(this) {
            int a = 0;

            int b = a + 10;
        }
    }
}
